using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsDownloadResponse : GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsDownloadResponse, SnsDownloadResponse.Builder>
		{
			private bool resultIsReadOnly;
			private SnsDownloadResponse result;
			protected override SnsDownloadResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsDownloadResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsDownloadResponse DefaultInstanceForType
			{
				get
				{
					return SnsDownloadResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public int StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public int TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public SKBuiltinBuffer_t Buffer
			{
				get
				{
					return this.result.Buffer;
				}
				set
				{
					this.SetBuffer(value);
				}
			}
			public string BufferId
			{
				get
				{
					return this.result.BufferId;
				}
				set
				{
					this.SetBufferId(value);
				}
			}
			public uint Type
			{
				get
				{
					return this.result.Type;
				}
				set
				{
					this.SetType(value);
				}
			}
			public Builder()
			{
				this.result = SnsDownloadResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsDownloadResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsDownloadResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsDownloadResponse other = this.result;
					this.result = new SnsDownloadResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsDownloadResponse.Builder Clear()
			{
				this.result = SnsDownloadResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsDownloadResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsDownloadResponse.Builder(this.result);
				}
				return new SnsDownloadResponse.Builder().MergeFrom(this.result);
			}
			public override SnsDownloadResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsDownloadResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsDownloadResponse)
				{
					return this.MergeFrom((SnsDownloadResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsDownloadResponse.Builder MergeFrom(SnsDownloadResponse other)
			{
				return this;
			}
			public override SnsDownloadResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsDownloadResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsDownloadResponse._snsDownloadResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsDownloadResponse._snsDownloadResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasStartPos = input.ReadInt32(ref this.result.startPos_);
							continue;
						}
					}
					else
					{
						if (num3 <= 34u)
						{
							if (num3 == 24u)
							{
								this.result.hasTotalLen = input.ReadInt32(ref this.result.totalLen_);
								continue;
							}
							if (num3 == 34u)
							{
								SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
								if (this.result.hasBuffer)
								{
									builder2.MergeFrom(this.Buffer);
								}
								input.ReadMessage(builder2, extensionRegistry);
								this.Buffer = builder2.BuildPartial();
								continue;
							}
						}
						else
						{
							if (num3 == 42u)
							{
								this.result.hasBufferId = input.ReadString(ref this.result.bufferId_);
								continue;
							}
							if (num3 == 48u)
							{
								this.result.hasType = input.ReadUInt32(ref this.result.type_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsDownloadResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public SnsDownloadResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public SnsDownloadResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public SnsDownloadResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public SnsDownloadResponse.Builder SetStartPos(int value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public SnsDownloadResponse.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0;
				return this;
			}
			public SnsDownloadResponse.Builder SetTotalLen(int value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public SnsDownloadResponse.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0;
				return this;
			}
			public SnsDownloadResponse.Builder SetBuffer(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = value;
				return this;
			}
			public SnsDownloadResponse.Builder SetBuffer(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = builderForValue.Build();
				return this;
			}
			public SnsDownloadResponse.Builder MergeBuffer(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBuffer && this.result.buffer_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.buffer_ = SKBuiltinBuffer_t.CreateBuilder(this.result.buffer_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.buffer_ = value;
				}
				this.result.hasBuffer = true;
				return this;
			}
			public SnsDownloadResponse.Builder ClearBuffer()
			{
				this.PrepareBuilder();
				this.result.hasBuffer = false;
				this.result.buffer_ = null;
				return this;
			}
			public SnsDownloadResponse.Builder SetBufferId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBufferId = true;
				this.result.bufferId_ = value;
				return this;
			}
			public SnsDownloadResponse.Builder ClearBufferId()
			{
				this.PrepareBuilder();
				this.result.hasBufferId = false;
				this.result.bufferId_ = "";
				return this;
			}
			public SnsDownloadResponse.Builder SetType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasType = true;
				this.result.type_ = value;
				return this;
			}
			public SnsDownloadResponse.Builder ClearType()
			{
				this.PrepareBuilder();
				this.result.hasType = false;
				this.result.type_ = 0u;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int StartPosFieldNumber = 2;
		public const int TotalLenFieldNumber = 3;
		public const int BufferFieldNumber = 4;
		public const int BufferIdFieldNumber = 5;
		public const int TypeFieldNumber = 6;
		private static readonly SnsDownloadResponse defaultInstance;
		private static readonly string[] _snsDownloadResponseFieldNames;
		private static readonly uint[] _snsDownloadResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasStartPos;
		private int startPos_;
		private bool hasTotalLen;
		private int totalLen_;
		private bool hasBuffer;
		private SKBuiltinBuffer_t buffer_;
		private bool hasBufferId;
		private string bufferId_ = "";
		private bool hasType;
		private uint type_;
		private int memoizedSerializedSize = -1;
		public static SnsDownloadResponse DefaultInstance
		{
			get
			{
				return SnsDownloadResponse.defaultInstance;
			}
		}
		public override SnsDownloadResponse DefaultInstanceForType
		{
			get
			{
				return SnsDownloadResponse.DefaultInstance;
			}
		}
		protected override SnsDownloadResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public int StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public int TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public SKBuiltinBuffer_t Buffer
		{
			get
			{
				return this.buffer_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public string BufferId
		{
			get
			{
				return this.bufferId_;
			}
		}
		public uint Type
		{
			get
			{
				return this.type_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasStartPos && this.hasTotalLen && this.hasBuffer && this.hasType && this.BaseResponse.IsInitialized && this.Buffer.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.StartPos);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeInt32Size(3, this.TotalLen);
				}
				if (this.hasBuffer)
				{
					num += CodedOutputStream.ComputeMessageSize(4, this.Buffer);
				}
				if (this.hasBufferId)
				{
					num += CodedOutputStream.ComputeStringSize(5, this.BufferId);
				}
				if (this.hasType)
				{
					num += CodedOutputStream.ComputeUInt32Size(6, this.Type);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsDownloadResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsDownloadResponseFieldNames = SnsDownloadResponse._snsDownloadResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, snsDownloadResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasStartPos)
			{
				output.WriteInt32(2, snsDownloadResponseFieldNames[3], this.StartPos);
			}
			if (this.hasTotalLen)
			{
				output.WriteInt32(3, snsDownloadResponseFieldNames[4], this.TotalLen);
			}
			if (this.hasBuffer)
			{
				output.WriteMessage(4, snsDownloadResponseFieldNames[1], this.Buffer);
			}
			if (this.hasBufferId)
			{
				output.WriteString(5, snsDownloadResponseFieldNames[2], this.BufferId);
			}
			if (this.hasType)
			{
				output.WriteUInt32(6, snsDownloadResponseFieldNames[5], this.Type);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasBuffer)
			{
				num ^= this.buffer_.GetHashCode();
			}
			if (this.hasBufferId)
			{
				num ^= this.bufferId_.GetHashCode();
			}
			if (this.hasType)
			{
				num ^= this.type_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsDownloadResponse snsDownloadResponse = value as SnsDownloadResponse;
			return snsDownloadResponse != null && (this.hasBaseResponse == snsDownloadResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(snsDownloadResponse.baseResponse_))) && (this.hasStartPos == snsDownloadResponse.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(snsDownloadResponse.startPos_))) && (this.hasTotalLen == snsDownloadResponse.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(snsDownloadResponse.totalLen_))) && (this.hasBuffer == snsDownloadResponse.hasBuffer && (!this.hasBuffer || this.buffer_.Equals(snsDownloadResponse.buffer_))) && (this.hasBufferId == snsDownloadResponse.hasBufferId && (!this.hasBufferId || this.bufferId_.Equals(snsDownloadResponse.bufferId_))) && (this.hasType == snsDownloadResponse.hasType && (!this.hasType || this.type_.Equals(snsDownloadResponse.type_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>.PrintField("Buffer", this.hasBuffer, this.buffer_, writer);
			GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>.PrintField("BufferId", this.hasBufferId, this.bufferId_, writer);
			GeneratedMessageLite<SnsDownloadResponse, SnsDownloadResponse.Builder>.PrintField("Type", this.hasType, this.type_, writer);
		}
		public static SnsDownloadResponse ParseFrom(byte[] data)
		{
			return SnsDownloadResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsDownloadResponse MakeReadOnly()
		{
			return this;
		}
		public static SnsDownloadResponse.Builder CreateBuilder()
		{
			return new SnsDownloadResponse.Builder();
		}
		public override SnsDownloadResponse.Builder ToBuilder()
		{
			return SnsDownloadResponse.CreateBuilder(this);
		}
		public override SnsDownloadResponse.Builder CreateBuilderForType()
		{
			return new SnsDownloadResponse.Builder();
		}
		public static SnsDownloadResponse.Builder CreateBuilder(SnsDownloadResponse prototype)
		{
			return new SnsDownloadResponse.Builder(prototype);
		}
		static SnsDownloadResponse()
		{
			SnsDownloadResponse.defaultInstance = new SnsDownloadResponse().MakeReadOnly();
			SnsDownloadResponse._snsDownloadResponseFieldNames = new string[]
			{
				"BaseResponse",
				"Buffer",
				"BufferId",
				"StartPos",
				"TotalLen",
				"Type"
			};
			SnsDownloadResponse._snsDownloadResponseFieldTags = new uint[]
			{
				10u,
				34u,
				42u,
				16u,
				24u,
				48u
			};
			object.ReferenceEquals(micromsg.Proto.SnsDownloadResponse.Descriptor, null);
		}
	}
}
